For some reason, we are seeing damage being NULL here.
While that should never be the case, crashing on it is
unkind and makes the Wayland experience unusable.
egl_surface = gdk_wayland_window_get_egl_surface (window->impl_window,
context_wayland->egl_config);
- if (display_wayland->have_egl_swap_buffers_with_damage)
+ if (display_wayland->have_egl_swap_buffers_with_damage && damage != NULL)
{
int i, j, n_rects = cairo_region_num_rectangles (damage);
EGLint *rects = g_new (EGLint, n_rects * 4);